cmake_minimum_required(VERSION 3.23)
project(Armor_detect)

set(CMAKE_CXX_STANDARD 14)
#修改成自己的编译目录lib
set(OpenCV_DIR K:/opencv4.6/opencv_mingw_build/install/x64/mingw/lib)

FIND_PACKAGE(OpenCV REQUIRED) #找到opencv的安装路径
include_directories(include ${OpenCV_INCLUDE_DIRS}) #加载opencv的头文件
link_directories(${OpenCV_LIBS})

#include/Serial.h src/Serial.cpp
#串口在linux系统下再进行编译测试
add_executable(Armor_detect main.cpp src/Armor_detect.cpp include/Armor_detect.h src/AngleSolve.cpp include/AngleSolve.h  include/Multithreading.h src/Multithreading.cpp include/Buff_detect.h src/Buff_detect.cpp include/tool.h)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${OpenCV_LIBS})   #链接lib文件道可执行文件中